package com.angis.fx.activity.jcdj;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.angis.fx.activity.R;

public class EquipmentRegisterActivity extends Activity {

	private ListView lListView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		hideStatusBar();
		this.setContentView(R.layout.equipmentregisteractivity);
		lListView = (ListView) this.findViewById(R.id.eqr_list);
		lListView.setAdapter(new ArrayAdapter<String>(
				EquipmentRegisterActivity.this,
				android.R.layout.simple_list_item_multiple_choice, new String[] {
						"1", "2" }));
		lListView.setItemsCanFocus(false);  
		lListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
	}

	/**
	 * 状态栏隐藏(全屏),在Activity.setCurrentView();之前调用此方法
	 */
	private void hideStatusBar() {
		// 隐藏标题
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		// 定义全屏参数
		int flag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
		// 获得窗口对象
		Window myWindow = this.getWindow();
		// 设置Flag标识
		myWindow.setFlags(flag, flag);
	}

}
